package com.yanjiang;

import java.sql.ResultSet;

public class NewsDaoIml1 extends BaseDao implements NewsDao{
    @Override
    public void getNews() {
        try {
          String sql="SELECT id,title FROM `news_detail`"  ;
          Object[] object={};
            ResultSet re= selectObj(sql,object);
            if (re.next()){
                int id= re.getInt("id");
                String title= re.getString("title");
                System.out.println(id+title);
            }

        }catch (Exception e){
            e.printStackTrace();
        }
    }


}
